package nl.vu.few.ibivu.biomodels.shared;

import java.io.Serializable;

import nl.vu.few.ibivu.biomodels.client.ui.cytoscapeweb.CytoscapeWebNode;
import nl.vu.few.ibivu.biomodels.client.ui.cytoscapeweb.CytoscapeWebPoint;

public class PetrifierPoint implements Serializable {
	private static final long serialVersionUID = 147985759733449273L;
	String id;
	int x;
	int y;
	private PetrifierPoint() {}
	public PetrifierPoint(String id, int x, int y) {
		this();
		this.id = id;
		this.x = x;
		this.y = y;
	}
	public PetrifierPoint(CytoscapeWebPoint point) {
		this(point.getId(), point.getX(), point.getY());
	}
	public PetrifierPoint(CytoscapeWebNode node) {
		this(node.getData().getId(), node.getX(), node.getY());
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public int getX() {
		return x;
	}
	public void setX(int x) {
		this.x = x;
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
	}
	public CytoscapeWebPoint cytoscapeWebPoint() {
		return CytoscapeWebPoint.create(id, x, y);
	}
}
